<include file="Common/header" />
<title>房卡添加</title>
</head>
<body>
<div class="pd-20">
	<form action="" method="post" class="form form-horizontal" id="form-user-character-add">
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">* </span>房卡号：</label>
			<div class="formControls col-6">
				<input type="text" class="input-text radius" value="{$info['card']}" placeholder="" id="card" name="card" datatype="*4-16" nullmsg="">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">* </span>房卡号：</label>
			<div class="formControls col-6">
				<input type="text" class="input-text radius" value="{$info['card_udid']}" placeholder="" id="card_udid" name="card_udid" datatype="*4-16" nullmsg="">
			</div>
		</div>
		
		<input type="hidden" id="card_id" name="card_id" value="{$info['id']}" />
		<div class="row cl">
			<div class="col-10 col-offset-5">
				<button type="button" class="btn btn-success radius" id="admin-role-save" name="admin-role-save"><i class="icon-ok"></i> 确定</button>
			</div>
		</div>
	</form>
</div>
<script>
	$(document).ready(function(){
		$(".btn-success").on('click', function(){
			var load = layer.load(2);
			$.post('card.html', $("#form-user-character-add").serialize(), function(data){
				layer.close(load);
				if(data == '操作成功'){
					layer.msg(data, {icon: 1, time: 2000}, function(){
						location.reload();
					});
				}else{
					layer.msg(data, {icon: 2, time: 2000});
				}
			});
		});
	});
</script>
</body>
</html>